package com.dkm.entity;

import javax.persistence.Table;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
@Table(name = "sign_in_log")
public class SignInLog {

	@Id
	private String sl_id;
	private String user_id;
	private String user_name;
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date sign_in_time;
	private Integer sign_in_status;
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date sign_out_time;
	public SignInLog() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	public SignInLog(String sl_id, String user_id, String user_name, Date sign_in_time, Integer sign_in_status,
			Date sign_out_time) {
		super();
		this.sl_id = sl_id;
		this.user_id = user_id;
		this.user_name = user_name;
		this.sign_in_time = sign_in_time;
		this.sign_in_status = sign_in_status;
		this.sign_out_time = sign_out_time;
	}


	public String getUser_name() {
		return user_name;
	}

	public void setUser_name(String user_name) {
		this.user_name = user_name;
	}

	public String getSl_id() {
		return sl_id;
	}
	public void setSl_id(String sl_id) {
		this.sl_id = sl_id;
	}
	public String getUser_id() {
		return user_id;
	}
	public void setUser_id(String user_id) {
		this.user_id = user_id;
	}
	public Date getSign_in_time() {
		return sign_in_time;
	}
	public void setSign_in_time(Date sign_in_time) {
		this.sign_in_time = sign_in_time;
	}
	public Integer getSign_in_status() {
		return sign_in_status;
	}
	public void setSign_in_status(Integer sign_in_status) {
		this.sign_in_status = sign_in_status;
	}
	
	public Date getSign_out_time() {
		return sign_out_time;
	}
	public void setSign_out_time(Date sign_out_time) {
		this.sign_out_time = sign_out_time;
	}

	@Override
	public String toString() {
		return "SignInLog [sl_id=" + sl_id + ", user_id=" + user_id + ", user_name=" + user_name + ", sign_in_time="
				+ sign_in_time + ", sign_in_status=" + sign_in_status + ", sign_out_time=" + sign_out_time + "]";
	}
	
}
